
<!DOCTYPE html>

<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

    <title>Adding your first devices &#8212; LAVA 2024.05 documentation</title>
    <link rel="stylesheet" type="text/css" href="_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="_static/bootstrap-sphinx.css" />
    <script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
    <script src="_static/jquery.js"></script>
    <script src="_static/underscore.js"></script>
    <script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
    <script src="_static/doctools.js"></script>
    <script src="_static/sphinx_highlight.js"></script>
    <link rel="shortcut icon" href="_static/favicon.ico"/>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="Continuous Integration" href="lava_ci.html" />
    <link rel="prev" title="Configuring user authentication" href="authentication.html" />
    <link rel="canonical" href="https://docs.lavasoftware.org/lava/first-devices.html" />
  
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
<meta name="apple-mobile-web-app-capable" content="yes">
<script type="text/javascript" src="_static/js/jquery-1.12.4.min.js"></script>
<script type="text/javascript" src="_static/js/jquery-fix.js"></script>
<script type="text/javascript" src="_static/bootstrap-3.4.1/js/bootstrap.min.js"></script>
<script type="text/javascript" src="_static/bootstrap-sphinx.js"></script>


  </head><body>

  <div id="navbar" class="navbar navbar-default navbar-fixed-top">
    <div class="container">
      <div class="navbar-header">
        <!-- .btn-navbar is used as the toggle for collapsed navbar content -->
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <a class="navbar-brand" href="index.html"><span><img src="_static/lava.png"></span>
          LAVA</a>
        <span class="navbar-text navbar-version pull-left"><b>2024.05</b></span>
      </div>

        <div class="collapse navbar-collapse nav-collapse">
          <ul class="nav navbar-nav">
            
                <li><a href="genindex.html">Index</a></li>
                <li><a href="contents.html">Contents</a></li>
            
            
              <li class="dropdown globaltoc-container">
  <a role="button"
     id="dLabelGlobalToc"
     data-toggle="dropdown"
     data-target="#"
     href="index.html">Site <b class="caret"></b></a>
  <ul class="dropdown-menu globaltoc"
      role="menu"
      aria-labelledby="dLabelGlobalToc"><ul class="current">
<li class="toctree-l1"><a class="reference internal" href="index.html">Introduction to LAVA</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="contents.html">Contents</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="glossary.html">Glossary of terms</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="support.html">Getting support</a></li>
</ul>
</ul>
</li>
              
                <li class="dropdown">
  <a role="button"
     id="dLabelLocalToc"
     data-toggle="dropdown"
     data-target="#"
     href="#">Page <b class="caret"></b></a>
  <ul class="dropdown-menu localtoc"
      role="menu"
      aria-labelledby="dLabelLocalToc"><ul>
<li><a class="reference internal" href="#">Adding your first devices</a><ul>
<li><a class="reference internal" href="#requirements">Requirements</a></li>
<li><a class="reference internal" href="#django-administration-interface">Django administration interface</a><ul>
<li><a class="reference internal" href="#administrative-interface-site-links">Administrative interface site links</a></li>
</ul>
</li>
<li><a class="reference internal" href="#start-with-a-known-device-type">Start with a known device type</a><ul>
<li><a class="reference internal" href="#qemu">QEMU</a><ul>
<li><a class="reference internal" href="#create-a-device-type">Create a Device Type</a></li>
<li><a class="reference internal" href="#create-a-device-in-the-database">Create a device in the database</a></li>
<li><a class="reference internal" href="#adding-a-dictionary-to-the-first-qemu-device">Adding a dictionary to the first QEMU device</a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#adding-other-devices-of-known-device-types">Adding other devices of known device-types</a><ul>
<li><a class="reference internal" href="#check-existing-instances">Check existing instances</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</ul>
</li>
              
            
            
              
                
  <li>
    <a href="authentication.html" title="Previous Chapter: Configuring user authentication"><span class="glyphicon glyphicon-chevron-left visible-sm"></span><span class="hidden-sm hidden-tablet">&laquo; Configuring u...</span>
    </a>
  </li>
  <li>
    <a href="lava_ci.html" title="Next Chapter: Continuous Integration"><span class="glyphicon glyphicon-chevron-right visible-sm"></span><span class="hidden-sm hidden-tablet">Continuous In... &raquo;</span>
    </a>
  </li>
              
            
            
            
            
              <li class="hidden-sm"></li>
            
          </ul>

          
            
<form class="navbar-form navbar-right" action="search.html" method="get">
 <div class="form-group">
  <input type="text" name="q" class="form-control" placeholder="Search" />
 </div>
  <input type="hidden" name="check_keywords" value="yes" />
  <input type="hidden" name="area" value="default" />
</form>
          
        </div>
    </div>
  </div>

<div class="container">
  <div class="row">
    <div class="body col-md-12 content" role="main">
      
  <section id="adding-your-first-devices">
<span id="first-devices"></span><span id="index-0"></span><h1>Adding your first devices<a class="headerlink" href="#adding-your-first-devices" title="Permalink to this heading">¶</a></h1>
<div class="admonition caution">
<p class="admonition-title">Caution</p>
<p><strong>Do not rush</strong>. <strong>Always</strong> start with QEMU testing, then add a
real device which is well supported by LAVA. Purchase and integrate one of
the <a class="reference internal" href="standard-armmp-ramdisk-bbb.html#standard-known-devices"><span class="std std-ref">standard known devices</span></a>. Take time to
learn what is required to automate a <a class="reference internal" href="glossary.html#term-DUT"><span class="xref std std-term">DUT</span></a>. Avoid rushing into adding
your own new <a class="reference internal" href="glossary.html#term-device-type"><span class="xref std std-term">device type</span></a>. When you have a LAVA instance which has
successfully run a few dozen test jobs using <code class="docutils literal notranslate"><span class="pre">QEMU</span></code> and a standard known
device, then consider how to <a class="reference internal" href="device-integration.html#adding-new-device-types"><span class="std std-ref">integrate a new device-type into LAVA</span></a>.</p>
</div>
<section id="requirements">
<h2>Requirements<a class="headerlink" href="#requirements" title="Permalink to this heading">¶</a></h2>
<p>You need to be familiar with these sections:</p>
<ol class="arabic simple">
<li><p><a class="reference internal" href="first-installation.html#installation"><span class="std std-ref">First steps installing LAVA</span></a></p></li>
<li><p><a class="reference internal" href="pipeline-server.html#setting-up-pipeline-instance"><span class="std std-ref">Creating a pipeline worker</span></a>.</p></li>
<li><p><a class="reference internal" href="pipeline-server.html#adding-pipeline-devices-to-worker"><span class="std std-ref">Adding devices to a worker</span></a></p></li>
<li><p><a class="reference internal" href="installing_on_debian.html#create-superuser"><span class="std std-ref">Superuser</span></a></p></li>
<li><p><a class="reference internal" href="first_steps.html#logging-in"><span class="std std-ref">Logging In</span></a> (as superuser)</p></li>
<li><p><a class="reference internal" href="devicetypes.html#device-types"><span class="std std-ref">Device types</span></a> and <a class="reference internal" href="devicetypes.html#device-type-elements"><span class="std std-ref">Database elements for a device type</span></a></p></li>
</ol>
</section>
<section id="django-administration-interface">
<span id="django-admin-interface"></span><h2>Django administration interface<a class="headerlink" href="#django-administration-interface" title="Permalink to this heading">¶</a></h2>
<p>The django admin interface is a core component of the django framework.
Elements can be added for particular implementations but, fundamentally, the
operation of the interface is the same as other django sites. The appearance of
the menu is determined by the version of django installed on your system. The
style changed substantially in django 1.9, so images of the interface itself
are not included here.</p>
<p>Changes within the administration interface and changes made as a superuser
through the UI are tracked through the <strong>History</strong> elements of objects in the
database. When viewing a specific element (for example a single Test Job or a
single Device), click on the <strong>History</strong> link to view all changes relating to
that element. There is also a link back to the UI view of the same element.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>the organization, layout and content of the django administration
interface is subject to change with upgrades to django itself and these
changes are outside the control of LAVA.</p>
</div>
<section id="administrative-interface-site-links">
<span id="django-admin-interface-sites"></span><h3>Administrative interface site links<a class="headerlink" href="#administrative-interface-site-links" title="Permalink to this heading">¶</a></h3>
<p>The django administrative interface offers links back to your LAVA instance
<em>if</em> the <code class="docutils literal notranslate"><span class="pre">Sites</span></code> element is modified. (The default django value is
<code class="docutils literal notranslate"><span class="pre">example.com</span></code>.) Navigate to the <code class="docutils literal notranslate"><span class="pre">Sites</span></code> element in the administrative
interface and modify the domain name and display name. Once complete, links
like <code class="docutils literal notranslate"><span class="pre">View</span> <span class="pre">site</span></code> and the <code class="docutils literal notranslate"><span class="pre">View</span> <span class="pre">on</span> <span class="pre">site</span></code> button on certain pages of the
interface will link to the correct location in your LAVA instance.</p>
</section>
</section>
<section id="start-with-a-known-device-type">
<h2>Start with a known device type<a class="headerlink" href="#start-with-a-known-device-type" title="Permalink to this heading">¶</a></h2>
<p>It is tempting to jump straight in with your one-off special device which
nobody else has managed to automate yet but a fresh install <strong>needs</strong> to be
tested with a known working configuration. Setting up known working devices and
learning how to modify the <a class="reference internal" href="first-job.html#first-job-definition"><span class="std std-ref">first job</span></a> is essential
to deciding how to best configure a new device. It is also <strong>recommended</strong> to
setup another known device type which is similar to the device you want to add
as there are different steps required for certain types of device.</p>
<p>This first QEMU device can be configured on the existing worker which is always
available on the master. Subsequent devices can be added to other workers and
devices can be shuffled between workers, subject to limitations of physical
connections.</p>
<section id="qemu">
<h3>QEMU<a class="headerlink" href="#qemu" title="Permalink to this heading">¶</a></h3>
<p>QEMU is always recommended as the first device to be set up on any LAVA
instance for a few reasons:</p>
<ol class="arabic simple">
<li><p>QEMU requires no external hardware or software configuration (until a
network bridge becomes desirable)</p></li>
<li><p>QEMU requires only a minimal <a class="reference internal" href="glossary.html#term-device-dictionary"><span class="xref std std-term">device dictionary</span></a>.</p></li>
<li><p>Test images for use with QEMU are readily available and relatively easy to
modify.</p></li>
</ol>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="gold-standards.html#creating-gold-standard-files"><span class="std std-ref">Creating a gold standard image</span></a> and
<a class="reference internal" href="#create-device-database"><span class="std std-ref">Create a device in the database</span></a>.</p>
</div>
<section id="create-a-device-type">
<span id="create-device-type-database"></span><span id="index-1"></span><h4>Create a Device Type<a class="headerlink" href="#create-a-device-type" title="Permalink to this heading">¶</a></h4>
<p>Prior to adding any devices, admins should add suitable <a class="reference internal" href="glossary.html#term-device-type"><span class="xref std std-term">device types</span></a> to the database. The device type name should match a jinja2
template file in:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">lava</span><span class="o">-</span><span class="n">server</span><span class="o">/</span><span class="n">dispatcher</span><span class="o">-</span><span class="n">config</span><span class="o">/</span><span class="n">device</span><span class="o">-</span><span class="n">types</span><span class="o">/</span>
</pre></div>
</div>
<p>If an existing template does not exist, a new template will need to be created.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="devicetypes.html#device-types"><span class="std std-ref">Device types</span></a></p>
</div>
<p>You can then either use the <a class="reference internal" href="#django-admin-interface"><span class="std std-ref">web admin interface</span></a>
or the <code class="docutils literal notranslate"><span class="pre">lava-server</span></code> command line to add device types.</p>
<p><strong>Using the admin interface</strong></p>
<p>In order to use the web admin interface, log in to the LAVA instance and click
on your username to see the Profile menu.</p>
<img alt="_images/profile-menu.png" src="_images/profile-menu.png" />
<p>The django administrative interface is accessed from the <code class="docutils literal notranslate"><span class="pre">Administration</span></code>
link in the profile menu.</p>
<ol class="arabic simple">
<li><p>Scroll down to the group labeled <code class="docutils literal notranslate"><span class="pre">LAVA_SCHEDULER_APP</span></code>.</p></li>
<li><p>Click on <code class="docutils literal notranslate"><span class="pre">Device</span> <span class="pre">types</span></code></p></li>
</ol>
<p>Just before you add the device type, take a look at the available
<a class="reference internal" href="devicetypes.html#device-type-elements"><span class="std std-ref">elements of a device type</span></a>:</p>
<ul class="simple">
<li><p>Name</p></li>
<li><p>Has health check</p></li>
<li><p>Display</p></li>
<li><p>Owners only</p></li>
<li><p>Health check frequency</p></li>
<li><p>Architecture name</p></li>
<li><p>Processor name</p></li>
<li><p>CPU model name</p></li>
<li><p>List of cores</p></li>
<li><p>Bit count</p></li>
</ul>
<p>The only value needed for the QEMU device type is the <strong>Name</strong>, just check that
<strong>Display</strong> is the default: enabled. Now Save.</p>
<p><strong>Using the command line</strong></p>
<p>On the command line, you can add device types (for instance QEMU and panda)
using:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">lava</span><span class="o">-</span><span class="n">server</span> <span class="n">manage</span> <span class="n">device</span><span class="o">-</span><span class="n">types</span> <span class="n">add</span> <span class="n">qemu</span>
<span class="n">lava</span><span class="o">-</span><span class="n">server</span> <span class="n">manage</span> <span class="n">device</span><span class="o">-</span><span class="n">types</span> <span class="n">add</span> <span class="n">panda</span>
</pre></div>
</div>
<p>It’s also possible to add all known device types at the same time with:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>lava-server manage device-types add &#39;*&#39;
</pre></div>
</div>
<p>Descriptive fields like <code class="docutils literal notranslate"><span class="pre">Architecture</span> <span class="pre">name</span></code>, <code class="docutils literal notranslate"><span class="pre">Processor</span> <span class="pre">name</span></code>, <code class="docutils literal notranslate"><span class="pre">CPU</span> <span class="pre">model</span>
<span class="pre">name</span></code>, <code class="docutils literal notranslate"><span class="pre">List</span> <span class="pre">of</span> <span class="pre">cores</span></code> and <code class="docutils literal notranslate"><span class="pre">Bit</span> <span class="pre">count</span></code> cannot be set on the command line.</p>
<p>Using the command line interface it’s also possible to list all known device
types:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>lava-server manage device-types list --all
</pre></div>
</div>
</section>
<section id="create-a-device-in-the-database">
<span id="create-device-database"></span><span id="index-2"></span><h4>Create a device in the database<a class="headerlink" href="#create-a-device-in-the-database" title="Permalink to this heading">¶</a></h4>
<p><strong>Using the admin interface</strong></p>
<ul class="simple">
<li><p>Navigate back to <code class="docutils literal notranslate"><span class="pre">LAVA_SCHEDULER_APP</span></code> and select <code class="docutils literal notranslate"><span class="pre">Devices</span></code> and
<code class="docutils literal notranslate"><span class="pre">Add</span> <span class="pre">Device</span></code>.</p></li>
<li><p>Select the QEMU device type from the list.</p></li>
<li><p>Give your device a name</p></li>
<li><p>Select the worker from the list.</p></li>
<li><p>Set the Device owner (typically one of the superusers).</p></li>
<li><p>Your first device should be public.</p></li>
<li><p>Ensure that the device is enabled as a <code class="docutils literal notranslate"><span class="pre">Pipeline</span> <span class="pre">device</span></code>.</p></li>
</ul>
<p><strong>Using the command line</strong></p>
<p>Using the command line interface it’s also possible to list all known device
types:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>lava-server manage device-types list -a
</pre></div>
</div>
<p>On the command line, you can add device types (for instance a QEMU type device
with a hostname <code class="docutils literal notranslate"><span class="pre">qemu01</span></code>) using:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>lava-server manage devices add --device-type qemu --worker &lt;worker&gt; qemu01
</pre></div>
</div>
<p>If a <a class="reference internal" href="glossary.html#term-health-check"><span class="xref std std-term">health check</span></a> is already defined, the device will start
running a health check immediately. Alternatively, specify the
<code class="docutils literal notranslate"><span class="pre">offline</span></code> option to set the initial state:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>lava-server manage devices add --offline --device-type qemu --worker &lt;worker&gt; qemu01
</pre></div>
</div>
<p>It is also possible to copy an existing device as a new device with a new hostname.</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span># copy existing qemu01 to a new qem02
lava-server manage devices copy qemu01 qemu02 --worker &lt;worker&gt; --offline
</pre></div>
</div>
<p>See <code class="docutils literal notranslate"><span class="pre">lava-server</span> <span class="pre">manage</span> <span class="pre">help</span> <span class="pre">devices</span></code> for more options.</p>
</section>
<section id="adding-a-dictionary-to-the-first-qemu-device">
<h4>Adding a dictionary to the first QEMU device<a class="headerlink" href="#adding-a-dictionary-to-the-first-qemu-device" title="Permalink to this heading">¶</a></h4>
<p>For the first device, a simple <a class="reference internal" href="glossary.html#term-device-dictionary"><span class="xref std std-term">device dictionary</span></a> can be used
to provide the device-specific details on top of the template:</p>
<div class="highlight-jinja notranslate"><div class="highlight"><pre><span></span><span class="cp">{%</span> <span class="k">extends</span> <span class="s1">&#39;qemu.jinja2&#39;</span> <span class="cp">%}</span>
<span class="cp">{%</span> <span class="k">set</span> <span class="nv">mac_addr</span> <span class="o">=</span> <span class="s1">&#39;52:54:00:12:34:59&#39;</span> <span class="cp">%}</span>
<span class="cp">{%</span> <span class="k">set</span> <span class="nv">memory</span> <span class="o">=</span> <span class="s1">&#39;1024&#39;</span> <span class="cp">%}</span>
</pre></div>
</div>
<p>Add this code to a new file named after your device in</p>
<blockquote>
<div><p>/etc/lava-server/dispatcher-config/devices/qemu01.jinja2</p>
</div></blockquote>
<ul>
<li><p>The device dictionary <strong>must</strong> <code class="docutils literal notranslate"><span class="pre">extend</span></code> an existing template.</p></li>
<li><p>The architecture (<code class="docutils literal notranslate"><span class="pre">arch</span></code> value) is not set in this device dictionary. This
allows this device to run test jobs using files for any architecture
supported by QEMU.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="simple-admin.html#overriding-device-configuration"><span class="std std-ref">Overriding device configuration</span></a></p>
</div>
</li>
<li><p>The MAC address needs to differ for each device of this type across all
instances on the same subnet.</p></li>
<li><p>The available memory for the virtual machine is set in megabytes. This can be
changed later to balance the requirements of test jobs with performance on
the worker.</p></li>
<li><p>Line ordering within the device dictionary is irrelevant, although it is
common to put the <code class="docutils literal notranslate"><span class="pre">extends</span></code> line first when storing the dictionary as a
file.</p></li>
</ul>
<p>The template itself lives in:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">share</span><span class="o">/</span><span class="n">lava</span><span class="o">-</span><span class="n">server</span><span class="o">/</span><span class="n">device</span><span class="o">-</span><span class="n">types</span><span class="o">/</span><span class="n">qemu</span><span class="o">.</span><span class="n">jinja2</span>
</pre></div>
</div>
<p>This dictionary does not include a setting to use a <code class="docutils literal notranslate"><span class="pre">tap</span></code> device which means
that this device would not support a hacking session inside the virtual
machine. Setting up a bridge is out of scope for this documentation.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="pipeline-admin.html#create-device-dictionary"><span class="std std-ref">Creating a device dictionary for the device</span></a> to export and modify a device
dictionary, <a class="reference internal" href="pipeline-admin.html#updating-device-dictionary"><span class="std std-ref">Updating a device dictionary</span></a> to import a device dictionary
into the database for use with a new or existing device,
<a class="reference internal" href="pipeline-admin.html#checking-templates"><span class="std std-ref">Checking your templates</span></a> for help with types of devices other than QEMU and
<a class="reference internal" href="pipeline-admin.html#device-type-templates"><span class="std std-ref">Device type templates</span></a> for help with how the device dictionary works
with the device-type templates.</p>
</div>
<p>Once updated, the device dictionary is added to the Device view in the
administrative interface under the Advanced Properties section at the base of
the page.</p>
</section>
</section>
</section>
<section id="adding-other-devices-of-known-device-types">
<span id="adding-known-devices"></span><span id="index-3"></span><h2>Adding other devices of known device-types<a class="headerlink" href="#adding-other-devices-of-known-device-types" title="Permalink to this heading">¶</a></h2>
<p>The core principles remain the same as for QEMU, the main differences are in
the way that the device dictionary is needed to provide a wider range of
settings covering power control, serial connections, network details and other
values.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="healthchecks.html#health-checks"><span class="std std-ref">Writing Health Checks for devices</span></a> - each time a new device type is added to an
instance, a health check test job needs to be defined.</p>
</div>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="growing_your_lab.html#growing-your-lab"><span class="std std-ref">Growing your lab</span></a>, including <a class="reference internal" href="growing_your_lab.html#lab-scaling"><span class="std std-ref">How many devices is too many for one worker?</span></a>.</p>
</div>
<section id="check-existing-instances">
<h3>Check existing instances<a class="headerlink" href="#check-existing-instances" title="Permalink to this heading">¶</a></h3>
<p>Templates usually exist for known device types because an existing instance is
using the template. Often, that instance will be Linaro’s central validation
lab in Cambridge which is accessible via <a class="reference external" href="https://validation.linaro.org/">https://validation.linaro.org/</a> .</p>
<p>The contents of the device dictionary for particular devices are visible to
anyone with access to that device type, using the device detail page. Details
of the jinja2 files used to update the device dictionary on Linaro instances is
also held in git:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">git</span><span class="o">.</span><span class="n">linaro</span><span class="o">.</span><span class="n">org</span><span class="o">/</span><span class="n">lava</span><span class="o">/</span><span class="n">lava</span><span class="o">-</span><span class="n">lab</span><span class="o">.</span><span class="n">git</span>
</pre></div>
</div>
<p>The structure of the device dictionary files will be similar for each device of
the same type but the values will change. An example for a beaglebone-black
device looks like:</p>
<div class="highlight-jinja notranslate"><div class="highlight"><pre><span></span><span class="cp">{%</span> <span class="k">extends</span> <span class="s1">&#39;beaglebone-black.jinja2&#39;</span> <span class="cp">%}</span>
<span class="cp">{%</span> <span class="k">set</span> <span class="nv">connection_command</span> <span class="o">=</span> <span class="s1">&#39;telnet localhost 7101&#39;</span> <span class="cp">%}</span>
<span class="cp">{%</span> <span class="k">set</span> <span class="nv">hard_reset_command</span> <span class="o">=</span> <span class="s1">&#39;/usr/local/lab-scripts/snmp_pdu_control --hostname pdu15 --command reboot --port 11&#39;</span> <span class="cp">%}</span>
<span class="cp">{%</span> <span class="k">set</span> <span class="nv">power_off_command</span> <span class="o">=</span> <span class="s1">&#39;/usr/local/lab-scripts/snmp_pdu_control --hostname pdu15 --command off --port 11&#39;</span> <span class="cp">%}</span>
<span class="cp">{%</span> <span class="k">set</span> <span class="nv">power_on_command</span> <span class="o">=</span> <span class="s1">&#39;/usr/local/lab-scripts/snmp_pdu_control --hostname pdu15 --command on --port 11&#39;</span> <span class="cp">%}</span>
</pre></div>
</div>
<p><a class="reference external" href="https://git.linaro.org/lava/lava-lab.git/tree/staging.validation.linaro.org/master-configs/staging-master.lavalab/lava-server/dispatcher-config/devices/staging-black01.jinja2">https://git.linaro.org/lava/lava-lab.git/tree/staging.validation.linaro.org/master-configs/staging-master.lavalab/lava-server/dispatcher-config/devices/staging-black01.jinja2</a></p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>It is recommended to keep the device dictionary jinja files under
version control. The templates are configuration files, so if you modify the
default templates, those need to be under version control as well.</p>
</div>
</section>
</section>
</section>


    </div>
      
  </div>
</div>
<footer class="footer">
  <div class="container">
    <p class="pull-right">
      <a href="#">Back to top</a>
      
    </p>
    <p>
        &copy; Copyright 2010-2019, Linaro Limited.<br/>
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 5.3.0.<br/>
    </p>
  </div>
</footer>
  </body>
</html>